Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added log levels #506

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

KeerthanaAP
Copy link
Contributor

@KeerthanaAP KeerthanaAP commented Nov 2, 2023

Fix #34
As mentioned in the below table added log levels for the existing log messages.

Level Purpose
0 Info
1 Debug
2 Trace level 1
3 Trace level 2
4 Function entry and exit

@ppc64le-cloud-bot ppc64le-cloud-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 2, 2023
@mkumatag
Copy link
Member

@KeerthanaAP what is the default log level(what level messages will print if user doesn't mention anything)?

@KeerthanaAP KeerthanaAP reopened this Nov 15, 2023
@KeerthanaAP
Copy link
Contributor Author

@KeerthanaAP what is the default log level(what level messages will print if user doesn't mention anything)?

With the current changes, Only warnings and errors will be printed by default.
By default log level will be set to 0. User has to provide the log level 1 to print the info messages.

@mkumatag
Copy link
Member

With the current changes, Only warnings and errors will be printed by default.
By default log level will be set to 0. User has to provide the log level 1 to print the info messages.

Either we need to change the default level to some value and print the meaningful messages with that default level otherwise it won't print most of the messages.

@KeerthanaAP
Copy link
Contributor Author

With the current changes, Only warnings and errors will be printed by default.
By default log level will be set to 0. User has to provide the log level 1 to print the info messages.

Either we need to change the default level to some value and print the meaningful messages with that default level otherwise it won't print most of the messages.

Sure. Can we move all the log level one down as mentioned below. so that by default all the info messages will be printed.

Level Purpose
0 Info
1 Debug
2 Trace level 1
3 Trace level 2
4 Function entry and exit

@mkumatag
Copy link
Member

Sure. Can we move all the log level one down as mentioned below. so that by default all the info messages will be printed.

sgtm

@KeerthanaAP
Copy link
Contributor Author

Sure. Can we move all the log level one down as mentioned below. so that by default all the info messages will be printed.

sgtm

Done.Modified all the log level as mentioned and updated in the description

@KeerthanaAP
Copy link
Contributor Author

/retest-required

@mkumatag
Copy link
Member

/cc @kishen-v

cmd/dhcp-sync/dhcp-sync.go Outdated Show resolved Hide resolved
Copy link
Contributor

@kishen-v kishen-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few places where the capitalisation is not uniform in the existing code, it can be made uniform across the files, as this PR already covers most lines of logs.
Few other things:

  1. Usage of trailing periods. (...)
  2. Avoid capitalisation of error statements and formatting them with a : before the format specifier can be looked into to bring uniformity.

@KeerthanaAP KeerthanaAP force-pushed the log_level branch 2 times, most recently from fd46b99 to bc23314 Compare February 19, 2024 04:35
@KeerthanaAP KeerthanaAP force-pushed the log_level branch 2 times, most recently from 8950930 to ad45d00 Compare February 27, 2024 11:08
pkg/audit/audit.go Outdated Show resolved Hide resolved
test/e2e/sync/sync.go Outdated Show resolved Hide resolved
@KeerthanaAP KeerthanaAP force-pushed the log_level branch 2 times, most recently from c58f3f2 to d4dd907 Compare March 18, 2024 08:13
@KeerthanaAP KeerthanaAP force-pushed the log_level branch 4 times, most recently from 5ace3eb to c7f0330 Compare April 3, 2024 09:14
@kishen-v
Copy link
Contributor

/hold
/lgtm 😃

cc: @mkumatag

@ppc64le-cloud-bot ppc64le-cloud-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2024
Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor one

cmd/image/qcow2ova/qcow2ova.go Show resolved Hide resolved
Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ppc64le-cloud-bot ppc64le-cloud-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2024
@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KeerthanaAP, mkumatag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot ppc64le-cloud-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2024
@mkumatag
Copy link
Member

/unhold

@ppc64le-cloud-bot ppc64le-cloud-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 24, 2024
@ppc64le-cloud-bot ppc64le-cloud-bot merged commit 19fb224 into ppc64le-cloud:main Apr 24, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log levels for pvsadm
4 participants